<?php
/**
 * Observer, that who receives news
 * The SplObserver interface is used alongside SplSubject to implement the Observer Design Pattern.
 * SplObserver::update — Receive update from subject
 */
class Reader implements SplObserver {

	private $name;

	public function __construct($name)
	{
		$this->name = $name;
	}

	// update
	public function update(SplSubject $subject)
	{
		echo $this->name . ' is reading breakout news <b>'.$subject->getContent().'</b><br/>';
	}
}